<?php
namespace app\common\validate;

use think\Validate;

class LoveMarryValidate extends Validate
{
    protected $rule =   [
        'user_id|用户ID'             => 'require|integer',
        'marry_id|婚姻信息ID'        => 'require|integer',
        'page|页数'                  => 'require|integer',
        'limit|条数'                 => 'require|integer',
        'real_name|真实姓名'         => 'require|length:1,20',
        'card_id|身份证号'           => 'require|idCard',
        'relation|与本人关系'        => 'require|length:1,5',
        'marry_status|婚姻状态'      => 'require|in:1,2,3,4',
        'remarks|附加说明'           => 'require|length:1,500',
        'search_type|查询方式'       => 'require|in:0,1',
    ];
    
    protected $scene = [
        'list'     => ['user_id', 'card_id', 'page', 'limit'],
        'add'      => ['user_id', 'real_name', 'card_id', 'relation', 'marry_status', 'remarks'],
    ];
}